/*#include<stdio.h>
int fac(int a, int n) {
	int product = 1;
	for (int i = 0; i < n; i++) {
		product *= a;
	}
	return product;
}
int judge_digit(int a, int n) {
	if (a == 0 || a == 1) {
		return 0;
	}
	if (fac(2, n - 1) <= a && a < fac(2, n)) {
		return n - 1;
	} else {
		return judge_digit( a, n - 1);
	}
}
int judge_1_digit(int a, int n, int count) {
	if (n == 0) {
		if (a == 1) {
			count++;
			return count;
		}
		if (a == 0) {
			return count;
		}
	} else if (n > 0) {
		if (a >= fac(2, n)) {
			count++;
			a = a - fac( 2, n );
			return judge_1_digit(a, n - 1, count);
		} else {
			return judge_1_digit( a, n - 1, count);
		}
	}
}
int main() {
	int a = 0;
	int b = 0;
	int c = 0;
	scanf("%d %d", &a, &b);
	c = a ^ b;
	int n = judge_digit( c, 8 );
	int count = 0;
	n = judge_1_digit( c, n, count );
	printf("%d", n);
	return 0;
}
*/
#include <stdio.h>
#include <stdlib.h>

int main() {
	int a, b;
	while (scanf("%d %d", &a, &b) != EOF) {
		// 注意 while 处理多个 case
		int count = 0;
		for (int i = 0; i < 32; i++) {
			if ((a % 2) != (b % 2)) {
				count++;
			}
			a = a >> 1;
			b = b >> 1;
		}
		printf("%d\n", count);
	}
	return 0;
}

